package com.zy.experience_system.repository;

import com.zy.experience_system.entity.ClassAndSet;
import com.zy.experience_system.form.ClassAndSetForm;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface ClassAndSetRepository extends JpaRepository<ClassAndSet,Integer> {
    List<ClassAndSet> findAllByClassId(Integer classId);
    List<ClassAndSet> findAllBySetId(Integer setId);
    ClassAndSet findByClassIdAndSetId(Integer classId,Integer setId);
    @Transactional
    void deleteByClassIdAndSetId(Integer classId,Integer setId);
}
